Added tests for clean with verbose output
authorToby Hughes <tobywhughes@gmail.com>
Mon, 26 Feb 2018 23:33:23 +0000 (15:33 -0800)
committerToby Hughes <tobywhughes@gmail.com>
Mon, 26 Feb 2018 23:33:23 +0000 (15:33 -0800)
tests/clean.rs

index 0cf5523710aceee7fa858edbc61ab5124a73e0db..824c3a3adae71b57c0fc885f17a75f88abad61e0 100644 (file)
@@ -237,3 +237,30 @@ fn registry() {
     assert_that(p.cargo("build"),
                 execs().with_status(0));
 }
+
+#[test]
+fn clean_verbose(){
+    let p = project("foo")
+    .file("Cargo.toml", r#"
+        [package]
+        name = "foo"
+        version = "0.0.1"
+
+        [dependencies]
+        bar = "0.1"
+    "#)
+    .file("src/main.rs", "fn main() {}")
+    .build();
+
+    Package::new("bar", "0.1.0").publish();
+
+    assert_that(p.cargo("build"),
+                execs().with_status(0));
+    assert_that(p.cargo("clean").arg("-p").arg("bar").arg("--verbose"),
+                execs().with_status(0).with_stderr("\
+[REMOVING] [..]
+[REMOVING] [..]
+"));
+    assert_that(p.cargo("build"),
+            execs().with_status(0));
+}